<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <style>
    body {
      width: 300px;
      padding: 15px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      margin: 0;
    }
    
    .header {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 10px;
      margin: -15px -15px 15px -15px;
      text-align: center;
      font-weight: bold;
    }
    
    .status {
      background: #f5f5f5;
      padding: 10px;
      border-radius: 5px;
      margin-bottom: 10px;
      font-size: 12px;
    }
    
    .modified {
      background: #d4edda;
      border-left: 4px solid #28a745;
    }
    
    .normal {
      background: #f8d7da;
      border-left: 4px solid #dc3545;
    }
    
    .user-agent {
      font-family: monospace;
      background: #e9ecef;
      padding: 5px;
      border-radius: 3px;
      margin-top: 5px;
      word-break: break-all;
      font-size: 10px;
    }
    
    button {
      background: #007bff;
      color: white;
      border: none;
      padding: 8px 15px;
      border-radius: 4px;
      cursor: pointer;
      width: 100%;
      margin-top: 10px;
    }
    
    button:hover {
      background: #0056b3;
    }
    
    .info {
      font-size: 11px;
      color: #666;
      margin-top: 10px;
      line-height: 1.4;
    }
  </style>
</head>
<body>
  <div class="header">
    🔧 Custom User Agent
  </div>
  
  <div id="status" class="status">
    <div>📊 <strong>Current Tab Status:</strong></div>
    <div id="tab-status">Loading...</div>
  </div>
  
  <div id="user-agent-info">
    <div><strong>Custom User-Agent:</strong></div>
    <div class="user-agent">CustomBrowser/1.0 (Test Extension)</div>
  </div>
  
  <button id="test-button">Test User-Agent Request</button>
  <button id="refresh-button">Refresh Status</button>
  
  <div class="info">
    <strong>How it works:</strong><br>
    • Modifies User-Agent for example.com and httpbin.org<br>
    • Content script shows current status<br>
    • Tests browser-proxy context correlation<br>
  </div>
  
  <script src="popup.js"></script>
</body>
</html>